import apis from '../api/api'
import axios from 'axios'

export default {
    async adminLogin(credentials) {
        try {
            const response = await axios.post(apis.API_URL + 'adminlogin', {
                account: credentials.username,
                password: credentials.password
            });
            return response.data;
        } catch (error) {
            console.error('API调用失败:', error);
            throw error;
        }
    }
}